#pragma once
#define OK 1
#define ERROR 0

typedef int Status;
typedef int ElemType;
typedef struct Node
{
	struct Node* next;
	ElemType data;
}Node,*LinkStackPtr;


typedef struct Stack
{
	LinkStackPtr ps;
	int count;
}Stack;

void InitStack(Stack* s);

void DestroyStack(Stack* s);

int StackEmpty(Stack* s);

void GetTop(Stack* s, ElemType* e);

Status Push(Stack* s, ElemType e);

Status Pop(Stack* s, ElemType* e);

int StackLength(Stack* s);